From: Vasil Velichkov Date: Sun, 22 Mar 2020 20:22:13 +0000 (+0200) Subject: [PATCH 7/7] cmake: Remove the ORC from the VOLK public link interface X-Git-Tag: archive/raspbian/2.2.1-2+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dd793f8c2dd74c75d0d745dca1be28c099903d74;p=volk.git [PATCH 7/7] cmake: Remove the ORC from the VOLK public link interface The ORC is an internal dependency that is used to generate SIMD implementations of some the kernels and no ORC types or functions are exposed by the VOLK library so adding it to the public link interface is unnecessary when linking dynamically. Currently the ORC is added to the INTERFACE_LINK_LIBRARIES property of the Volk::volk target in VolkTargets.cmake and you need to have the ORC development files (liborc-*-dev) installed on your system in order to successfully link a program or library that uses VOLK. Gbp-Pq: Name 0007-cmake-Remove-the-ORC-from-the-VOLK-public-link-inter.patch --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c5c784a..02ffa40 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -465,7 +465,6 @@ if(ORC_FOUND) #setup orc library usage include_directories(${ORC_INCLUDE_DIRS}) link_directories(${ORC_LIBRARY_DIRS}) - list(APPEND volk_libraries ${ORC_LIBRARIES}) #setup orc functions file(GLOB orc_files ${PROJECT_SOURCE_DIR}/kernels/volk/asm/orc/*.orc) @@ -572,6 +571,9 @@ target_include_directories(volk ) #Configure target properties +if(ORC_FOUND) + target_link_libraries(volk PRIVATE ${ORC_LIBRARIES}) +endif() if(NOT MSVC) target_link_libraries(volk PUBLIC m) endif() @@ -597,6 +599,9 @@ install(TARGETS volk if(ENABLE_STATIC_LIBS) add_library(volk_static STATIC $) target_link_libraries(volk_static PUBLIC ${volk_libraries} pthread) + if(ORC_FOUND) + target_link_libraries(volk_static PUBLIC ${ORC_LIBRARIES}) + endif() if(NOT MSVC) target_link_libraries(volk_static PUBLIC m) endif()